package hczc.longcai.com.hccrowdfunding.home.fourth_mine.fragments;


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

import hczc.longcai.com.hccrowdfunding.R;
import hczc.longcai.com.hccrowdfunding.application.BaseApplication;
import hczc.longcai.com.hccrowdfunding.home.first_index.adapters.IndexHotAdapter;
import hczc.longcai.com.hccrowdfunding.home.first_index.beans.IndexHotRecommend;
import hczc.longcai.com.hccrowdfunding.home.first_index.beans.ProjectInfo;
import hczc.longcai.com.hccrowdfunding.utils.bitmaputils.ImageLoader;

/**
 * A simple {@link Fragment} subclass.
 */
public class AttenFqxmFragment extends Fragment {


    private ListView listView;

    private List<ProjectInfo> list;
    private IndexHotAdapter adapter;
    private ImageLoader imageLoader;

    public AttenFqxmFragment() {
        // Required empty public constructor
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        imageLoader = new ImageLoader(getActivity());
        initDatas();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_atten_fqxm, container, false);
        BaseApplication.scaleScreenHelper.loadView(((ViewGroup) view));
        initView(view);


        return view;
    }

    private void initDatas() {
        list = new ArrayList<>();


    }


    private void initView(View view) {
        listView = ((ListView) view.findViewById(R.id.atten_fqxm_listview));
        adapter = new IndexHotAdapter(getActivity(),list,imageLoader);
        listView.setAdapter(adapter);

    }

}
